package org.viettan.android.main.view;

import java.util.List;

import org.viettan.android.main.model.Campaign;

import android.app.Activity;

import com.google.inject.Inject;
import com.google.inject.Provider;

/**
 * Actual factory implementation to create {@link CampaignAdapter}s. This is only needed because
 * RoboGuice does not yet support assisted injection.
 */
public class CampaignAdapterFactoryImpl implements CampaignAdapterFactory {
    private final Provider<ViewUtility> viewUtilityProvider;

    @Inject
    public CampaignAdapterFactoryImpl(Provider<ViewUtility> viewUtilityProvider) {
	this.viewUtilityProvider = viewUtilityProvider;
    }

    /**
     * Creates a new instance of {@code CampaignAdaptor}.
     */
    public CampaignAdapter create(Activity activity, int textViewResourceId,
	    List<Campaign> items) {
	return new CampaignAdapter(activity, viewUtilityProvider, textViewResourceId,
		items);
    }
}
